//------------------------------------------------------------------------------------
#include "CSprite.h"
#include "common.h"
//------------------------------------------------------------------------------------
void CSprite::draw(QPainter *painter, QImage image) {
    QPoint realPos=QPoint(position.x()*CELL_WIDTH, (position.y()+INFO_HEIGHT)*CELL_HEIGHT);

    painter->drawImage(realPos, image);
}
//------------------------------------------------------------------------------------
int CSprite::getIndex(void) {
    return position.y()*NB_CELL_WIDTH+position.x();
}
//------------------------------------------------------------------------------------
